<script setup>
import { ref } from 'vue';
import { useNameStore } from '../stores/name';
const name = useNameStore()
const { changeLastName } = name
const input = ref("")
</script>



<template>
  <div class="D">
    <el-input v-model="input" placeholder="修改名" class="input" />
    <el-button @click="changeLastName(input)" class="btn">提交</el-button>
  </div>
</template>



<style scoped>
.input {
  width: 100px;
}
</style>